var cc__decorate = __decorate;
Object.defineProperty(exports, "__esModule", {
  value: true
});
var $2UIManager = require("UIManager");
var $2pvzChannel = require("pvzChannel");
var cc__decorator = cc._decorator;
var ccp_ccclass = cc__decorator.ccclass;
var ccp_property = cc__decorator.property;
var def_MoreGameUI = /* */function (_cc$Component50) {
  babel_inherits(r, _cc$Component50);
  var _super54 = babel_createSuper(r);
  function r() {
    var _this118;
    babel_classCallCheck(this, r);
    _this118 = _super54.apply(this, arguments);
    _this118.isBannerShow = false;
    return _this118;
  }
  babel_createClass(r, [{
    key: "onLoad",
    value: function onLoad() {
      this.node.getChildByName("Continue").y *= cc.view.getCanvasSize().height / cc.view.getCanvasSize().width / (1700 / 750);
      this.node.getChildByName("Title").y *= cc.view.getCanvasSize().height / cc.view.getCanvasSize().width / (1700 / 750);
      if ($2pvzChannel.pvzChannel.instance().getPara("gird9")) {
        $2pvzChannel.pvzChannel.instance().showGird9();
        $2pvzChannel.pvzChannel.instance().getCtrl("p5") && this.schedule(this.flash, 1, cc.macro.REPEAT_FOREVER);
      } else {
        this.node.active = false;
      }
      $2pvzChannel.pvzChannel.instance().closeNative("nativeIcon");
    }
  }, {
    key: "flash",
    value: function flash() {
      if (this.isBannerShow) {
        $2pvzChannel.pvzChannel.instance().closeBanner();
      } else {
        $2pvzChannel.pvzChannel.instance().showBanner();
      }
      this.isBannerShow = !this.isBannerShow;
    }
  }, {
    key: "onClickClose",
    value: function onClickClose() {
      console.log("close===1");
      $2pvzChannel.pvzChannel.instance().closeGird9();
      $2pvzChannel.pvzChannel.instance().closeBanner();
      this.unscheduleAllCallbacks();
      $2UIManager.default.instance.closeUI("MoreGameUI");
    }
  }]);
  return r;
}(cc.Component);
def_MoreGameUI = cc__decorate([ccp_ccclass], def_MoreGameUI);
exports.default = def_MoreGameUI;